package com.whfc.mach.dao;

import com.whfc.entity.dto.msg.AppMsgToUserDTO;
import com.whfc.mach.entity.AppMachWarnRuleUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AppMachWarnRuleUserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(AppMachWarnRuleUser record);

    int insertSelective(AppMachWarnRuleUser record);

    AppMachWarnRuleUser selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(AppMachWarnRuleUser record);

    int updateByPrimaryKey(AppMachWarnRuleUser record);

    /**
     * 根据报警规则id查找
     *
     * @param ruleId
     * @return
     */
    List<AppMsgToUserDTO> selectByRuleId(@Param("ruleId") Integer ruleId);

    /**
     * 根据报警规则id删除
     *
     * @param ruleId
     */
    void deleteByRuleId(@Param("ruleId") Integer ruleId);

    /**
     * 批量插入
     *
     * @param list
     */
    void batchInsert(@Param("list") List<AppMsgToUserDTO> list);
}